package guo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ApplicationController1 {

    @Autowired
    ApplicationContext applicationContext;

    @GetMapping("/applicationall")
    public void testAllApplication(){

        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
        System.out.println(beanDefinitionNames.length);
        for (String s:beanDefinitionNames){
            System.out.println("s = " + s);
        }

    }
}
